﻿using System;
using System.Collections.Generic;

namespace base31.Services.Hub.Models
{
    /// <summary>
    /// Represents stats about a feed we know that exists.
    /// Parent is the KnownFeed entity for a given topic URL.
    /// </summary>
    public class KnownFeedStats
    {
        public int SubscriberCount { get; set; }
        public DateTime UpdateTime { get; set; }

        /// <summary>
        /// Creates a key for a KnownFeedStats instance.
        /// </summary>
        /// <param name="topicUrl">The topic URL to create the key for.</param>
        /// <param name="topicHash">The hash of the topic URL to create the key for. May only
        /// be supplied if topic_url is None.</param>
        /// <returns>db.Key of the KnownFeedStats instance.</returns>
        public string CreateKey(string topicUrl = null,
                                string topicHash = null)
        {
            return null;
        }

        /// <summary>
        /// Retrieves and/or creates KnownFeedStats entities for the supplied topics.
        /// </summary>
        /// <param name="topicList">List of topics to retrieve.</param>
        /// <returns>The list of KnownFeedStats corresponding to the input topic list in
        /// the same order they were supplied.</returns>
        public List<KnownFeedStats> GetOrCreateAll(List<string> topicList)
        {
            return null;
        }
    }
}